package com.enjoyor.soa.traffic.rest.tsms.dubbo.impl;

import java.util.Map;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.enjoyor.soa.traffic.api.dto.tsms.CommonPlaceDto;
import com.enjoyor.soa.traffic.api.service.dubbo.tsms.IDubboCommonPlaceService;
import com.enjoyor.soa.traffic.rest.tsms.dubbo.ICommonPlaceConsumeService;
import com.enjoyor.soa.traffic.util.pojo.Page;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

@Component
public class CommonPlaceConsumeService implements ICommonPlaceConsumeService{
	
	@Reference(version = "1.0.0", timeout = 10000)
	//@Reference(version = "1.0.0", timeout = 10000, url="dubbo://192.168.56.8:21241")
	private IDubboCommonPlaceService iDubboCommonPlaceService;
	@Override
	public ResultPojo getCommonPlacePage(Page page,String commonPlaceId,String commonPlaceName,String placeTypeId,String placeTypeName,String placeAddress,String createPerson,String createTime,String placePerson) {
		// TODO Auto-generated method stub
		ResultPojo resultPojo = new ResultPojo();
		resultPojo = iDubboCommonPlaceService.selectPage(page,commonPlaceId,commonPlaceName,placeTypeId,placeTypeName,placeAddress,createPerson,createTime,placePerson);
		return resultPojo;
	}
	@Override
	public ResultPojo getCommonPlaceList(String commonPlaceId,String commonPlaceName,String placeTypeId,String placeTypeName,String placeAddress,String createPerson,String createTime,String placePerson) {
		// TODO Auto-generated method stub
		ResultPojo resultPojo = new ResultPojo();
		resultPojo = iDubboCommonPlaceService.selectList(commonPlaceId,commonPlaceName,placeTypeId,placeTypeName,placeAddress,createPerson,createTime,placePerson);
		return resultPojo;
	}
	@Override
	public ResultPojo insert(CommonPlaceDto commonPlaceDto, String personName) {
		// TODO Auto-generated method stub
		ResultPojo resultPojo = new ResultPojo();
		resultPojo = iDubboCommonPlaceService.insert(commonPlaceDto, personName);
		return resultPojo;
	}
	@Override
	public ResultPojo update(CommonPlaceDto commonPlaceDto, String personName) {
		// TODO Auto-generated method stub
		ResultPojo resultPojo = new ResultPojo();
		resultPojo = iDubboCommonPlaceService.update(commonPlaceDto, personName);
		return resultPojo;
	}
	@Override
	public ResultPojo delete(String commonPlaceId,String personName) {
		// TODO Auto-generated method stub
		ResultPojo resultPojo = new ResultPojo();
		resultPojo = iDubboCommonPlaceService.delete(commonPlaceId, personName);
		return resultPojo;
	}

}
